akanshgulati/commit-semantics 37
Commit semantics is a git aliases installation script to follow a fix format for commits
akanshgulati/covid19-tracker-extension 4
A popup extension to get latest statistics on COVID-19 infected cases globally
Library for type checking elements of array
akanshgulati/bk-murli-alexa-skill 1
Alexa audio skill to play brahma kumari murli
akanshgulati/duckduckgo-locales 1
Translation files for duckduckgo.com
akanshgulati/Access-Control-Allow-Origin 0
Chrome extension: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi
One framework. Mobile & desktop.
Our Database
issue commentlykmapipo/mongoose-gridfs
Write Callback not giving a error or success state
@jakesjews No problem. I tagged you assuming you contributing in core part of package. cc: @lykmapipo
comment created time in 3 days
issue openedlykmapipo/mongoose-gridfs
Write Callback not giving a error or success state
I am using a CRON job to fetch 50MB around data from remote server and writing that data to MongoDB server.
The issue with current code is that the console.log('data stream formed'); is executed in writeLargeData method, data is being added to mongo DB server but data added successfully is not coming in logs and due to this the parent promise is never resolved. Could you please suggest what's being done wrong.
const { createModel } = require('mongoose-gridfs');
const mongoose = require('mongoose');
const connection = mongoose.connection;
const Readable = require('stream').Readable;
const cron = require('node-cron');
const axios = require('axios');
const ExampleModel = createModel({
modelName: 'fs',
connection: connection,
});
async function addDataToMongo(dataStream) {
const options = ({filename: 'data.txt', contentType: 'text/plain'});
return new Promise((res, rej)=>{
ExampleModel.write(options, dataStream, (error, file) => {
if (error) {
console.log('error', error);
rej(error);
return;
}
res(file._id.toString());
console.log('data added successfully' + file._id.toString());
});
});
}
function getReadableStreamFromString(string) {
let count = 0;
const chunkSize = 10000;
return new Readable({
read() {
if (count < string.length) {
this.push(string.slice(count, count + chunkSize));
count += chunkSize;
} else {
this.push(null);
}
}
});
}
async function writeLargeData() {
const response = await axios.request({
url: 'https://abc.com',
method: 'GET',
});
console.log('response fetched');
const dataStream = getReadableStreamFromString(response);
console.log('data stream formed');
await addDataToMongo(dataStream);
}
cron.schedule('30 12,18,22 * * *', writeLargeData);
@jakesjews Please suggest what should be done in this case.
created time in 4 days
issue commentlykmapipo/mongoose-gridfs
write() callback not working, and connection not closing
@vrmerlin I think you have used await in a wrong way here as when the write process is called it will call callback method and not a promise getting resolved.
You can wrap this login inside a promise to make this work.
comment created time in 4 days
startedtech-conferences/confs.tech
started time in 16 days
startedgulp-community/gulp-less
started time in a month
issue openedgulp-community/gulp-less
The README.md file says it supports Gulp 3.x version only.
created time in a month
startedokonet/lint-staged
started time in a month
startedgulpjs/gulp
started time in 2 months
startedgatsbyjs/gatsby-starter-theme-workspace
started time in 2 months
push eventakanshgulati/covid19-tracker-extension
commit sha 88a45a5964ab868d5242f19d3cb21a368c67ef3e
feat(Social): Add review and share popups
commit sha 6b877521b063fa7c0fc79168fad6e6ec6cc0dc80
Merge pull request #4 from akanshgulati/social-popups feat(Social): Add review and share popups
push time in 2 months
PR merged akanshgulati/covid19-tracker-extension
pr closed time in 2 months
startedakanshgulati/covid19-tracker-extension
started time in 2 months
PR opened akanshgulati/covid19-tracker-extension
pr created time in 2 months
create barnchakanshgulati/covid19-tracker-extension
created branch time in 2 months
startedritz078/moose
started time in 2 months
push eventakanshgulati/personal-blog-gatsby-markdown
commit sha c288de83bd652abb6c57bde1db238342e6a2da0d
fix(TextAnimation): Update typos, improve text and grammer mistakes
push time in 2 months
push eventakanshgulati/personal-blog-gatsby-markdown
commit sha 379bf02baac01607b8db21fb6f9bf1b1c69680dc
fix(TextAnimation): Update typos and grammer mistakes
commit sha 1d2fde1bedf89f1ec041ce8aad1f4e8759ae67a0
chore(Add excalidraw file):
push time in 2 months
push eventakanshgulati/personal-blog-gatsby-markdown
commit sha 95dd2b447d95c7cf7d2d0ced7fd0f703866e8b53
feat(TextAnimation): Add more content to Text Animation
push time in 2 months
push eventakanshgulati/personal-blog-gatsby-markdown
commit sha bf37162042aa50ef545a2c1ec2ee01f00fcdaec9
feat(TextAnimation): Add CSS based Text animation
commit sha 2b3b739a585c5024330add7f90d84f2291029fc2
Merge pull request #12 from akanshgulati/post-text-animation feat(TextAnimation): Add CSS based Text animation
push time in 2 months
PR merged akanshgulati/personal-blog-gatsby-markdown
pr closed time in 2 months
PR opened akanshgulati/personal-blog-gatsby-markdown
pr created time in 2 months
push eventakanshgulati/personal-blog-gatsby-markdown
commit sha 3639bfe621b79b2b01281ddaedfe5dec534dcfe9
chore(Gatsby): Update version of the ghost
push time in 2 months
create barnchakanshgulati/personal-blog-gatsby-markdown
created branch time in 2 months
created tagakanshgulati/covid19-tracker-extension
A popup extension to get latest statistics on COVID-19 infected cases globally
created time in 3 months
PR merged akanshgulati/covid19-tracker-extension
pr closed time in 3 months
push eventakanshgulati/covid19-tracker-extension
commit sha 70ba4f5cf64f8d4bf00984b539d204131884f486
fix(DistrictMode): Add district data support
commit sha 31b003d339eb0038c8e83e78b7e2147cc47d1f6b
fix(Misc): Add animation, formatting long numbers
commit sha c550012483a19119610725696c9bfb4a8d5eb240
fix(VersionBump):
commit sha 6127c80dfe95dc144332e2c8155e3ee33d277b0e
Merge pull request #3 from akanshgulati/district-data District data
push time in 3 months
PR opened akanshgulati/covid19-tracker-extension
pr created time in 3 months
push eventakanshgulati/covid19-tracker-extension
commit sha c550012483a19119610725696c9bfb4a8d5eb240
fix(VersionBump):
push time in 3 months
push eventakanshgulati/covid19-tracker-extension
commit sha 31b003d339eb0038c8e83e78b7e2147cc47d1f6b
fix(Misc): Add animation, formatting long numbers
push time in 3 months
create barnchakanshgulati/covid19-tracker-extension
created branch time in 3 months
push eventakanshgulati/covid-backend
commit sha 963f4ac9fc88951ea05ae5c9362ce006c0ba7b6a
fix(DistrictData): Add district info for india
push time in 3 months