Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
veNJOB
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Thanh Hung Pham
  • veNJOB
  • Merge Requests
  • !2

Merged
Opened Jun 30, 2017 by Thanh Hung Pham@hungpt 
  • Report abuse
Report abuse

Hungpt import csv

Import data from csv

  • Discussion 4
  • Commits 9
  • Changes 11
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Thanh Hung Pham @hungpt

    added 9 commits

    • 42dc461e...454004db - 8 commits from branch master
    • 95480c2e - Merge remote-tracking branch 'origin/master'

    Compare with previous version

    Jul 04, 2017

    added 9 commits

    • 42dc461e...454004db - 8 commits from branch master
    • 95480c2e - Merge remote-tracking branch 'origin/master'

    Compare with previous version

    added 9 commits * 42dc461e...454004db - 8 commits from branch `master` * 95480c2e - Merge remote-tracking branch 'origin/master' [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3440&start_sha=42dc461e4a73baf17a5fe49dda7f246102739705)
    Toggle commit list
  • Thanh Hung Pham @hungpt

    added 1 commit

    • 6ab9a5d1 - Config autoload file and schedule content update

    Compare with previous version

    Jul 04, 2017

    added 1 commit

    • 6ab9a5d1 - Config autoload file and schedule content update

    Compare with previous version

    added 1 commit * 6ab9a5d1 - Config autoload file and schedule content update [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3442&start_sha=95480c2e41e49de5558c664419e1b0a5c8ff78ac)
    Toggle commit list
  • Thanh Hung Pham @hungpt

    added 1 commit

    • a3e43368 - Fix same merge quest 1

    Compare with previous version

    Jul 04, 2017

    added 1 commit

    • a3e43368 - Fix same merge quest 1

    Compare with previous version

    added 1 commit * a3e43368 - Fix same merge quest 1 [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3444&start_sha=6ab9a5d153534e555e424f9b0da4631b65e13855)
    Toggle commit list
  • Tan Phat Nguyen
    @phatnt started a discussion on an old version of the diff Jul 06, 2017
    Last updated by Thanh Hung Pham Jul 06, 2017
    lib/import/csv_reader.rb 0 → 100644
    3 require 'csv'
    4
    5 class Import::CSVReader
    6 attr_reader :thread_count, :logger
    7
    8 def initialize(file, thread_count)
    9 @file = file
    10 @thread_count = thread_count
    11 @mutex = Mutex.new
    12 @logger = Logger.new("#{Rails.root}/log/csv_reader.log")
    13 end
    14
    15 def import
    16 @logger.info('Start read data')
    17 workers = (0...thread_count).map do
    18 Thread.new do
    • Tan Phat Nguyen @phatnt commented Jul 06, 2017
      Master

      @hungpt Thread cho nay co tac dung gi ko, chay 2 thread 1 noi dung import?

      @hungpt Thread cho nay co tac dung gi ko, chay 2 thread 1 noi dung import?
    • Thanh Hung Pham @hungpt

      changed this line in version 8 of the diff

      Jul 06, 2017

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3460&start_sha=7d3f85c2f970e6c4ffc3a98763487cfa76c8bc1f#048213cbe05374d1776592f975b320d313a484ac_18_15)
      Toggle commit list
    • Thanh Hung Pham @hungpt commented Jul 06, 2017
      Master

      fixed

      fixed
    Please register or sign in to reply
  • Tan Phat Nguyen
    @phatnt started a discussion on an old version of the diff Jul 06, 2017
    Last updated by Thanh Hung Pham Jul 06, 2017
    lib/tasks/import_csv.rake 0 → 100644
    1 require 'net/ftp'
    2 require 'rubygems'
    3 require 'zip'
    4
    5 namespace :import do
    6 desc 'Import CSV'
    7 task csv: :environment do
    8 thread_count = ENV['THREAD_COUNT'] || 1
    9
    10 ftp = Net::FTP.new
    • Tan Phat Nguyen @phatnt commented Jul 06, 2017
      Master

      @hungpt nen move FTP vao mot module rieng, sau nay co the dung lai

      vd de trong: lib/utils/download.rb

      @hungpt nen move FTP vao mot module rieng, sau nay co the dung lai vd de trong: `lib/utils/download.rb`
    • Thanh Hung Pham @hungpt

      changed this line in version 7 of the diff

      Jul 06, 2017

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3458&start_sha=a3e43368664a8fa3153cdfce206190073ae5d3bf#91a31931bba4cd9e2f88de1ac29fa9b96dd38055_10_8)
      Toggle commit list
    • Thanh Hung Pham @hungpt commented Jul 06, 2017
      Master

      fixed

      fixed
    Please register or sign in to reply
  • Thanh Hung Pham @hungpt

    added 1 commit

    • 7d3f85c2 - create module FTP

    Compare with previous version

    Jul 06, 2017

    added 1 commit

    • 7d3f85c2 - create module FTP

    Compare with previous version

    added 1 commit * 7d3f85c2 - create module FTP [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3458&start_sha=a3e43368664a8fa3153cdfce206190073ae5d3bf)
    Toggle commit list
  • Thanh Hung Pham @hungpt

    added 1 commit

    • 105faa0e - fox code and remove thread

    Compare with previous version

    Jul 06, 2017

    added 1 commit

    • 105faa0e - fox code and remove thread

    Compare with previous version

    added 1 commit * 105faa0e - fox code and remove thread [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3460&start_sha=7d3f85c2f970e6c4ffc3a98763487cfa76c8bc1f)
    Toggle commit list
  • Thanh Hung Pham @hungpt

    added 1 commit

    • da4165f8 - Fix continue row error when import csv

    Compare with previous version

    Jul 07, 2017

    added 1 commit

    • da4165f8 - Fix continue row error when import csv

    Compare with previous version

    added 1 commit * da4165f8 - Fix continue row error when import csv [Compare with previous version](https://gitlab.zigexn.vn/hungpt/veNJOB/merge_requests/2/diffs?diff_id=3462&start_sha=105faa0eb05d2d752c166bb10f426725bfdeed04)
    Toggle commit list
  • Tan Phat Nguyen @phatnt

    mentioned in commit 01626a94

    Jul 07, 2017

    mentioned in commit 01626a94

    mentioned in commit 01626a94264d4dd34e7087b8fa633a1564e54e9d
    Toggle commit list
  • Tan Phat Nguyen @phatnt

    merged

    Jul 07, 2017

    merged

    merged
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hungpt/veNJOB!2
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.