keboola / job-queue-internal-api-php-client
Client for internal job queue API
23.5.0
2024-10-21 13:48 UTC
Requires
- php: ^8.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3|^7.0
- keboola/artifacts: ^3.0
- keboola/kbc-manage-api-php-client: ^5.2|^6.0|^7.0
- keboola/object-encryptor: ^2.8
- keboola/permission-checker: ^2.0
- keboola/storage-api-client: ^15.2
- keboola/storage-api-php-client-branch-wrapper: ^6.0
- monolog/monolog: ^2.6
- psr/log: ^1.1|^2.0|^3.0
- symfony/config: ^5.4|^6.0
- symfony/uid: ^5.4|^6.2
- symfony/validator: ^5.4|^6.0
Requires (Dev)
- infection/infection: ^0.27
- keboola/coding-standard: >=14.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^9.5
- sempro/phpunit-pretty-print: ^1.4
- symfony/dotenv: ^6.3
- dev-main
- 23.5.0
- 23.4.0
- 23.3.0
- 23.2.0
- 23.1.3
- 23.1.2
- 23.1.1
- 23.1.0
- 23.0.0
- 22.1.0
- 22.0.0
- 21.0.0
- 20.0.0
- 19.0.1
- 19.0.0
- 18.7.0
- 18.6.3
- 18.6.2
- 18.6.1
- 18.6.0
- 18.5.0
- 18.4.0
- 18.3.0
- 18.2.0
- 18.1.0
- 18.0.0
- 17.2.2
- 17.2.1
- 17.2.0
- 17.1.0
- 17.0.1
- 17.0.0
- 16.1.0
- 16.0.0
- 15.6.1
- 15.6.0
- 15.5.0
- 15.4.0
- 15.3.0
- 15.2.0
- 15.1.0
- 15.0.0
- 14.4.1
- 14.4.0
- 14.3.0
- 14.2.0
- 14.1.0
- 14.0.0
- 13.0.0
- 12.0.0
- 11.0.2
- 11.0.1
- 11.0.0
- 10.10.0
- 10.9.2
- 10.9.1
- 10.9.0
- 10.8.1
- 10.8.0
- 10.7.0
- 10.6.0
- 10.5.1
- 10.5.0
- 10.4.1
- 10.4.0
- 10.3.0
- 10.2.0
- 10.1.0
- 10.0.0
- 9.7.0
- 9.6.0
- 9.5.2
- 9.5.1
- 9.5.0
- 9.4.1
- 9.3.0
- 9.2.1
- 9.2.0
- 9.1.1
- 9.1.0
- 9.0.1
- 9.0.0
- 8.2.0
- 8.1.0
- 8.0.0
- 7.8.0
- 7.7.0
- 7.6.0
- 7.5.0
- 7.4.0
- 7.3.0
- 7.2.0
- 7.1.0
- 7.0.0
- dev-jv-PST-1076-data-loader-tests
- dev-jv-PST-2135-secrets-collector
- dev-jv-PST-2136-filter-event-secrets
- dev-jv-legacy-prefix
- dev-pepa_PST-1969_backports
- dev-pepa_test
- dev-kacurez-gitops-lab-gar-push-ST-1901
- dev-jv-fix-search-endpoints-naming
- dev-adamvyborny-PST-1179-internal-api-elastic-poc
- dev-dependabot/composer/apps/gelf-logger-server/aws/aws-sdk-php-3.304.4
- dev-dependabot/composer/apps/public-api/aws/aws-sdk-php-3.297.3
- dev-dependabot/composer/apps/public-api/symfony/security-http-6.4.4
- dev-ujovlado-no-license
- dev-internal-api-php-client-9.x
- dev-dependabot/composer/apps/input-mapping/guzzlehttp/psr7-2.4.5
- dev-dependabot/composer/apps/gelf-logger-server/guzzlehttp/psr7-1.9.1
- dev-miro-PST-393
- dev-pepa-hackathon
- dev-pepa_gha
This package is auto-updated.
Last update: 2024-11-20 16:06:30 UTC
README
PHP client for the Internal Job Queue API (API docs).
Usage
composer require keboola/job-queue-internal-api-php-client
use Keboola\JobQueueInternalClient\Client; $storageClientFactory = new JobFactory\StorageClientFactory('http://connetion.keboola.com/'); $objectEncryptorFactory = new ObjectEncryptorFactory('key-id', 'us-east-1', '', ''); $jobFactory = new JobFactory($storageClientFactory, $objectEncryptorFactory); $client = new Client( new NullLogger(), $jobFactory, 'http://internal.queue.api/', 'testQueueToken' ); $client->getJobData('123'); $client->postJobResult('123', 'success', ['images' => ['digests' => []]]);
Development
Prerequisites:
- configured
az
andaws
CLI tools (runaz login
andaws configure --profile keboola-dev-platform-services
) - installed GCP CLI
gcloud
(and rungcloud auth login
orgcloud auth application-default login
) - installed
terraform
(https://www.terraform.io) andjq
(https://stedolan.github.io/jq) to setup local env - intalled
docker
anddocker compose
to run & develop the app
TL;DR:
export NAME_PREFIX= # your name/nickname to make your resource unique & recognizable
cat <<EOF > ./provisioning/local/terraform.tfvars
name_prefix = "${NAME_PREFIX}"
EOF
cat <<EOF > .env.local
TEST_STORAGE_API_URL=https://connection.keboola.com
TEST_STORAGE_API_TOKEN=
TEST_STORAGE_API_TOKEN_MASTER=
EOF
terraform -chdir=./provisioning/local init -backend-config="key=job-queue-internal-api-php-client/${NAME_PREFIX}.tfstate"
terraform -chdir=./provisioning/local apply
./provisioning/local/update-env.sh azure # or aws
License
MIT licensed, see LICENSE file.