Skip to content

Commit

Permalink
fix job
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed Mar 13, 2024
1 parent c186378 commit da4e268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions res/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# The headers for API requests
HEADERS = {"Authorization": f"Bearer {SECRET_KEY}"}

TIMEOUT = int(os.getenv("TIMEOUT") or '30')
TIMEOUT = int(os.getenv("TIMEOUT") or "30")


def create(task_name, file_path=None):
Expand Down Expand Up @@ -142,7 +142,7 @@ def sign_one_file(file_path):
time.sleep(6)
n += 1
status = get_status(task_id)
if status and status["state"] == "done":
if status and status.get("state") == "done":
download_one_file(
task_id, os.path.basename(file_path), os.path.dirname(file_path)
)
Expand Down

0 comments on commit da4e268

Please sign in to comment.