Tutorial code copied from the Boto tutorial.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Automated inclusion of services with Fluxible | |
* | |
* The services are used on the server side as a resource. They fetch | |
* an endpoint and return the data. Right now for each resource, you | |
* need to manually include the file. | |
* | |
* The code sample needs to be placed in the /services/ directory of | |
* your application - and be named index.js. To register all your | |
* services, all you have to do: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from garcon import activity | |
from garcon import runner | |
domain = 'dev' | |
name = 'boto_tutorial' | |
create = activity.create(domain, name) | |
a_tasks = create( | |
name='a_tasks', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_activity_3 = create( | |
name='activity_3', | |
retry=10, | |
requires=[test_activity_1], | |
run=runner.Sync(activity_failure)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto.swf.layer2 as swf | |
from garcon import activity | |
from garcon import runner | |
from garcon import task | |
domain = 'dev' | |
name = 'context_example' | |
create = activity.create(domain, name) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto.swf.layer2 as swf | |
from garcon import activity | |
from garcon import runner | |
from garcon import task | |
import random | |
domain = 'dev' | |
name = 'country_flow' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {...*} var_args | |
* @return {*} | |
*/ | |
var url = function(var_args) {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from datetime import timezone | |
def now_utc_timestamp(): | |
"""Create a utc timestamp. | |
Args: | |
timestamp (int): the current timestamp, optional. |
Elasticsearch does not support min_children
and max_children
for nested
datatypes by default (see: issue #10043). In case you need this behavior, this gist provides an alternative solution. Please note that I haven't benchmarked it against join queries.
To support min_children
and max_children
for your nested query, all you have to do is to use a function_score
query. To make this more concrete: you have an index called Person
with the following mapping:
first_name
(text)email
(text)