@@ 54-64 (lines=11) @@ | ||
51 | $key = getenv("AWS_ACCESS_KEY_ID"); |
|
52 | $secret = getenv("AWS_SECRET_KEY"); |
|
53 | ||
54 | function usage() |
|
55 | { |
|
56 | echo("Usage: php " . basename(__FILE__) . " -c configFile [-h] [-k <key>] [-s <secret>] [-r <region>]\n"); |
|
57 | echo("-h: Print this help\n"); |
|
58 | echo("-d: Debug mode\n"); |
|
59 | echo("-c: configFile\n"); |
|
60 | echo("-k <AWS key>: Optional. Will use env variables by default\n"); |
|
61 | echo("-s <AWS secret>: Optional. Will use env variables by default\n"); |
|
62 | echo("-r <AWS region>: Optional. Will use env variables by default\n"); |
|
63 | exit(0); |
|
64 | } |
|
65 | ||
66 | function check_input_parameters() |
|
67 | { |
@@ 250-259 (lines=10) @@ | ||
247 | $debug = false; |
|
248 | $cpeLogger; |
|
249 | ||
250 | function usage($defaultConfigFile) |
|
251 | { |
|
252 | echo("# Description\nThe InputPoller connects your client applications to your stack. It handles communication over the two SQS channels you created for your client application.\n\n"); |
|
253 | echo("Usage: php ". basename(__FILE__) . " [-h] [-d] -n <client_name> [-l <log path>]\n"); |
|
254 | echo("-h: Print this help\n"); |
|
255 | echo("-d: Debug mode\n"); |
|
256 | echo("-l <log_path>: Location where logs will be dumped in (folder).\n"); |
|
257 | echo("-n <client_name> [mandatory]: The name of the client application that will use this Poller to communicate with the stack. The client will be sending and listenening to the Stack through SQS. We expect the INPUT_QUEUE and OUTPUT_QUEUE environment variables set to the URL of the SQS queues.\n"); |
|
258 | exit(0); |
|
259 | } |
|
260 | ||
261 | function check_input_parameters() |
|
262 | { |