Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Airflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Margrenzo Gunawan
Airflow
Commits
dce88605
Commit
dce88605
authored
Dec 22, 2023
by
Margrenzo Gunawan
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change DONE.SBS to count File
mengubah pengecekan file done dari DONE.SBS.2.csv jadi counting berjumlah 51
parent
64058ba2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
1_t24_cbi.py
1_t24_cbi.py
+9
-4
No files found.
1_t24_cbi.py
View file @
dce88605
...
...
@@ -67,13 +67,18 @@ def check_file_done(**kwargs):
from
random
import
randint
# number = randint(0, 10)
print
(
f'''
{
Variable
.
get
(
"LOCAL_PATH"
)
}
t24/
{
yesterday_nodash
}
/DONE.SBS.2.csv'''
)
# print(f'''{Variable.get("LOCAL_PATH")}t24/{yesterday_nodash}/DONE.SBS.2.csv''')
# len([name for name in os.listdir('.') if os.path.isfile(name)])
if
os
.
path
.
isfile
(
f'''
{
Variable
.
get
(
"LOCAL_PATH"
)
}
t24/
{
yesterday_nodash
}
/DONE.SBS.2.csv'''
):
print
(
"FILE DONE.SBS.2.csv sudah ada"
)
directory_path
=
f"""
{
Variable
.
get
(
"LOCAL_PATH"
)
}
t24/
{
yesterday_nodash
}
/"""
file_count
=
len
(
os
.
listdir
(
directory_path
))
print
(
F"""file count :::
{
file_count
}
"""
)
if
51
==
file_count
:
print
(
"FILE Complete"
)
return
True
else
:
print
(
"FILE
DONE.SBS.2.csv tidak ada
"
)
print
(
"FILE
Not Complete
"
)
# STOP DAG
return
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment