aboutsummaryrefslogtreecommitdiff
path: root/example/run-manual.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-11 01:37:01 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-11 01:37:04 +0300
commit517160645d75e5e7c94a99087630b9c3fc0c3823 (patch)
tree6977c3a6407b8813d1c6675a6ff283a7bbfde33a /example/run-manual.php
parent7ba383cc56e937a03ef8142964028b3a29863356 (diff)
delete examples dir
Diffstat (limited to 'example/run-manual.php')
-rw-r--r--example/run-manual.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/example/run-manual.php b/example/run-manual.php
deleted file mode 100644
index 5f9c43d..0000000
--- a/example/run-manual.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-require_once 'vendor/autoload.php';
-
-// connecting to mysql
-$db = new mysqli();
-if (!$db->real_connect('10.211.55.6', 'jobd', 'password', 'jobd'))
- die('Failed to connect.');
-
-// adding manual task
-$target = 'server1';
-$time = time();
-if (!$db->query("INSERT INTO jobs (target, slot, time_created, status) VALUES ('server1', 'normal', $time, 'manual')"))
- die($db->error);
-
-$id = $db->insert_id;
-
-try {
- // connecting to jobd
- $client = new jobd\Client(jobd\Client::WORKER_PORT);
-
- // launching task
- $result = $client->runManual($id);
-
- // printing the result
- print_r($result->getData());
-} catch (Exception $e) {
- die($e->getMessage());
-}