Skip to content

Commit

Permalink
Upd
Browse files Browse the repository at this point in the history
  • Loading branch information
A committed Jul 15, 2024
1 parent a3414a2 commit 9fa186f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
env:
PYTHON_VERSION: 3.12.4

permissions:
issues: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
Expand Down
42 changes: 29 additions & 13 deletions zapusk/client/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
from zapusk.models.job import JOB_STATE_ENUM


doc = """zapusk-client
doc = """zapusk
Usage:
zapusk-client -h | --help
zapusk-client --version
zapusk-client run <job_config_id> [--colors|--no-colors] [--tail]
zapusk-client exec <command> [--name=<name>] [--group=<group>] [--tail] [--schedule=<cron_expression>] [--colors|--no-colors]
zapusk-client cancel <job_id> [--scheduled] [--colors|--no-colors]
zapusk-client tail <job_id>
zapusk-client list [--filter=<state>|--scheduled] [--colors|--no-colors]
zapusk-client config_jobs [--colors|--no-colors]
zapusk-client config_groups [--colors|--no-colors]
zapusk-client waybar
zapusk -h | --help
zapusk --version
zapusk run <job_config_id> [--colors|--no-colors] [--tail]
zapusk exec <command> [--name=<name>] [--group=<group>] [--tail] [--schedule=<cron_expression>] [--colors|--no-colors]
zapusk cancel <job_id> [--scheduled] [--colors|--no-colors]
zapusk tail <job_id>
zapusk list [--filter=<state>|--scheduled] [--colors|--no-colors]
zapusk config_jobs [--colors|--no-colors]
zapusk config_groups [--colors|--no-colors]
zapusk waybar
Options:
Expand All @@ -32,8 +32,24 @@
-t --tail Tail logfile immediately
Examples:
zapusk run upload_to_s3
zapusk status
# Execute npm i in background
zapusk exec "npm i"
# Execute pytest and tail its log
zapusk exec "pytest -v" -t
# Schedule command to run every minute
zapusk exec "pung -c4 google.com" --schedule "*/1 * * * *"
# Run some job defined in ~/.config/zapusk/config.yaml
zapusk run youtube_dl
# Cancel some job with id
zapusk cancel 42
# See logs with id of a job
zapusk tail 42
"""

version = importlib.metadata.version("zapusk")
Expand Down

1 comment on commit 9fa186f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
zapusk
   logger.py00100%
zapusk/client
   api_client.py830100%
   command.py140100%
   command_cancel.py130100%
   command_config_groups.py90100%
   command_config_jobs.py90100%
   command_exec.py170100%
   command_list.py180100%
   command_manager.py280100%
   command_run.py90100%
   command_tail.py160100%
   command_testcase.py230100%
   command_waybar.py300100%
   output.py220100%
   printer.py30100%
zapusk/kawka
   consumer.py260100%
   consumer_group.py330100%
   linked_list.py100100%
   producer.py290100%
   topic.py270100%
   topic_iterator.py450100%
zapusk/lib
   create_jobitem.py60100%
   json_serdes.py70100%
zapusk/models
   base_model.py220100%
   config.py100100%
   id_field.py110100%
   job.py590100%
   job_config.py230100%
   job_group.py120100%
   scheduled_job.py240100%
zapusk/server
   api.py100100%
   controller_config.py110100%
   controller_jobs.py480100%
   controller_scheduled_jobs.py370100%
   error_response.py40100%
zapusk/services/config
   config_parser.py370100%
   constants.py40100%
   service.py540100%
   yaml_filereader.py50100%
zapusk/services/executor_manager
   service.py200100%
zapusk/services/executor_manager/backends/kawka
   args_consumer.py270100%
   backend.py350100%
   consumer.py460100%
   executor.py410100%
   state.py90100%
zapusk/services/scheduler_service
   service.py560100%
TOTAL10820100%

Please sign in to comment.