I'm trying to create a cloud job that does something for each client that has an active LiveQuery subscription.
Is there a way to achieve that list of users/connections trough cloud code?
Start the liveQuery server explicitly (e.g. by not providing options.startLiveQueryServer or options.liveQueryServerOptions)
const liveQueryServer = ParseServer.createLiveQueryServer(server, options.liveQueryServerOptions);
liveQueryServer.clients is what you need. Don't modify this map!
Related
I have a Keystone list schema that has a field of type 'File'.
So, a GraphQL mutation to update entity has an Upload GraphQL type for argument that corresponds to this field.
I need to execute update mutation using executeGraphql in server environment.
Did not found any plug-and-play solution for that.
One way, we are using for our test environment is to create an instance of ApolloClient and pass a link with createUploadLink from apollo-upload-client library. But, AFAIK, this approach will trigger real HTTP request.
It seems, like better way is to use existing instance of Keystone class on server sideā¦
Any recommendations?
Thank you.
Cheers!
We are currently using keen.io auto collector in our platform, this automatically collects form submissions. Is there any way to stop this from happening? Remove this feature from collecting form data??
You can find the configuration options for Keen.io's web auto collector within the keen-tracking.js repository on GitHub in the docs folder.
auto collector configuration
You want to pass the value for the recordFormSubmits property to false when calling the function to initialize the auto collector tracking object like this.
const client = new KeenTracking({
projectId: 'YOUR_PROJECT_ID',
writeKey: 'YOUR_WRITE_KEY'
});
client.initAutoTracking({
recordFormSubmits: true,
});
Take a look at the docs. There are a lot of options for customization in implementing tracking solutions for that library. If you need any more assistance with Keen.io, please feel free to reach out to me. I am happy to assist.
I want to update my processor_group variable via a processor. Even ExecuteScript works. Can this be achieved?
You can only update the variable registry through the REST API, the same way the UI does.
It is a PUT to /process-groups/{id}/variable-registry:
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
Just as an update to this Answer:
The nifi url you need is (default basic nifi node):
http://[IP ADDRESS]:8080/nifi-api/
The full api url you need to POST an update to an attribute is:
http://[IP ADDRESS]:8080/nifi-api/process-groups/[Process Group ID]/variable-registry/update-requests
An example of the payload is:
{"processGroupRevision":{"clientId":"c530ce77-0174-1000-fb36-93fa5e92e574","version":6},"disconnectedNodeAcknowledged":false,"variableRegistry":{"processGroupId":"c53cdaff-0174-1000-7922-5285dec53a94","variables":[{"variable":{"name":"authToken","value":"test3"}}]}}
To learn more about the payload, do some variable work in your NiFi UI and watch your developer tools for the "update-requests" entries and pay attention to the [Process Group ID] and the Payload.
We're using CRM On-Demand for our Service Group and I'm running into an application limitation and am wondering if anyone has a workaround or just some general ideas on how to accomplish our goal.
In the application, our major focus is around the Service Request and driving for users to create Tasks for all Activities related to working towards closure. For example, a customer calls in and we need a technical resource to make a return call to diagnose the issue in detail, so a Task is assigned to that resource. Once that Task has been marked as completed, I'd like the Status to be updated. I tried creating a workflow using JoinFieldValue(), which wasn't working. I tried a more basic approach and tried to just have a field on the Service Request be populated with the Status of the Task, but that did not work either.
Upon further investigation in the Help File, there is a relationship from the Activity object to the Service Request object, but not one the other way.
So, has anyone else run into this limitation and found some other method to have a Status change on the Task update the Status of a Service Request?
(Also, I'd like to try and avoid writing a custom web service for this purpose, which is why I'm trying to use the tools in the app)
Thanks in advance for any ideas!
actually, if I well understood your issue is related on workflow cross object.
OCOD doesn't manage this type of workflow when you need to use workaround.
In order to cover a cross object worklflow you have many possibilities:
webservices as you said, but you could imagine a js code that will run WS and hosted directly into OCOD (in R19 you could hoste that in Client Side extension). That could be a good solution
Another one could be using Report with a custom look up functionnality with the usage of "Callback" function
I would prefer the 1st solution.
I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to call this web service from a web page, and want some mechanism which will allow me to keep polling the server so that i can i can show some indicator of progress on the screen, like say, the number of files that have been processed. Please note that i do not want a notification on completion of the web method call, rather, i want a live progress status. How do i go about it?
Write a separate method on the server that you can query by passing the ID of the job that has been scheduled and which returns an approximate value between 0-100 (or 0.0 and 1.0, or whatever) of how far along it is.
E.g. in REST-style, you could make a GET request to http://yourserver.com/app/jobstatus/4133/ which would return a simple '52' as text/plain. Then you just have to query that every (second? two seconds? ten seconds?) to see how far along it is.
How you actually accomplish the monitoring on the backend hugely depends on what your process is and how it works.
I think XML web service is slow, so creating multiple methods and polling the progress will be extremely slow and will generate huge load on the server. I wouldn't do it in production environment. I see the same (but smaller) problems with database polling.
Try SOAP extensions instead. It implements an event-driven model. See Adding a Progress Bar to Your Web Service Client Application on MSDN.
You can also use SoapExtensions to notify your client of the download/process progress. The server can then send events to the client. Nothing in the client has to be changed if you don't use it.
Allows for something like this in your client:
//...
private localhost.MyWebServiceService _myWebService = new localhost.MyWebServiceService ();
_myWebService.processDelegate += ProgressUpdate;
_myWebService.CallHeavyMethod();
//...
private void ProgressUpdate(object sender, ProgressEventArgs e)
{
double progress = ((double)e.ProcessedSize / (double)e.TotalSize) * 100.00;
//Show Progress...
}
Have the initial "start report generation" web service call create a task in some task pool, and return the caller the ID of the task.
Then, provide another method that returns the "percent done" for a given taskId.
Provide a third method that returns the actual result for a completed task.
Easiest way would be to have the Web Service update a field on a database with the progress of the call, and then create a Web Service that queries that field and returns the value.
Make the web service to return some sort of task ID or session ID. Make another web method to query with that ID, which returns the information needed (% completion, list of files, whatever). Poll this method at some interval from the client.
Use a database to store the process information, if you do this in memory of the web service, this will not scale well in web farm environment, as it may happen that the task runs on another server, than the one you are polling.
EDIT: I just saw another similar answer, and comment to it. The commenter is right - you can use in-memory table to avoid disk operations, but still using a separate db server.