Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create entirely separate process for status update #39

Open
tpmccallum opened this issue Jun 3, 2019 · 0 comments
Open

Create entirely separate process for status update #39

tpmccallum opened this issue Jun 3, 2019 · 0 comments
Labels
enhancement New feature or request reliability and performance Tasks which relate to reliability of harvester and frontend

Comments

@tpmccallum
Copy link
Contributor

We are adding a feature which sets a flag (should the record in the index be constantly updated or has the still-alive contract reached a point where there is no longer any interaction)

This needs to be a separate process because weaving this into the main indexing means that the main indexing is not flexible enough for all contracts (restricted to that particular contracts variable names etc.)

The reality is that this task can be done using Javascript or Python and can run on a separate lightweight system.

For the giveaway contracts the logic would be something like this

doc = {}
outerData = {}
theStatus = "get this from ES (return the status and the itemid so we can perform an update)"
if theStatus == 0:
    outerData['requiresUpdating'] = "yes"
elif theStatus == 1:
    outerData['requiresUpdating'] = "no"
doc["doc"] = outerData
indexResult = self.updateDataInElastic(_esIndex, itemId, json.dumps(doc))

@tpmccallum tpmccallum added enhancement New feature or request reliability and performance Tasks which relate to reliability of harvester and frontend labels Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reliability and performance Tasks which relate to reliability of harvester and frontend
Projects
None yet
Development

No branches or pull requests

1 participant